﻿using System.Collections.Generic;

namespace Mefisto.Core.Resources.Contracts
{
    public interface IResourceProvider
    {
        /// <summary>
        /// Dynamic bag for passing parameters to methods
        /// <remarks>Should be of type IDictionary&lt;string, object&gt; for handling named parameters</remarks>
        /// </summary>
        dynamic TranslationBag { get; set; }

        /// <summary>
        /// Method for getting resource translation
        /// </summary>
        /// <param name="resourceCode">Resource code</param>
        /// <param name="cultureCode">Culture code (Optional)</param>
        /// <param name="applicationCode">Application code (Optional)</param>
        /// <returns>Resource translation</returns>
        string GetTranslation(string resourceCode, string cultureCode = "", string applicationCode = "");

        /// <summary>
        /// Method for getting all resource codes
        /// </summary>
        /// <param name="cultureCode">Culture code (Optional)</param>
        /// <param name="applicationCode">Application code (Optional)</param>
        /// <returns></returns>
        IEnumerable<string> GetAllResourceCodes(string cultureCode = "", string applicationCode = "");

        /// <summary>
        /// Method for deleting translations
        /// </summary>
        /// <param name="cultureCode">Culture code (Optional)</param>
        /// <param name="applicationCode">Application code (Optional)</param>
        void ClearTranslations(string cultureCode = "", string applicationCode = "");

        /// <summary>
        /// Method for clearing the translation bag
        /// </summary>
        void ClearTranslationBag();

        /// <summary>
        /// Method for getting available cultures list
        /// </summary>
        /// <param name="applicationCode">Application code (Optional)</param>
        /// <returns>Cultures Dictionary (Code/Name)</returns>
        IDictionary<string, string> GetAvailableCultures(string applicationCode = "");
    }
}